<!doctype html>
<html class="no-js" lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>
    
  DLNA DMR - kaelinda
  
  </title>
  
  
  <link href="atom.xml" rel="alternate" title="kaelinda" type="application/atom+xml">
    <link rel="stylesheet" href="asset/css/foundation.min.css" />
    <link rel="stylesheet" href="asset/css/docs.css" />
    <script src="asset/js/vendor/modernizr.js"></script>
    <script src="asset/js/vendor/jquery.js"></script>
  <script src="asset/highlightjs/highlight.pack.js"></script>
  <link href="asset/highlightjs/styles/github.css" media="screen, projection" rel="stylesheet" type="text/css">
  <script>hljs.initHighlightingOnLoad();</script>
<script type="text/javascript">
  function before_search(){
    var searchVal = 'site:kaelinda.top ' + document.getElementById('search_input').value;
    document.getElementById('search_q').value = searchVal;
    return true;
  }
</script>
  </head>
  <body class="antialiased hide-extras">
    
    <div class="marketing off-canvas-wrap" data-offcanvas>
      <div class="inner-wrap">


<nav class="top-bar docs-bar hide-for-small" data-topbar>


  <section class="top-bar-section">
  <div class="row">
      <div style="position: relative;width:100%;"><div style="position: absolute; width:100%;">
        <ul id="main-menu" class="left">
        
        <li id=""><a target="_self" href="index.html">最近更新</a></li>
        
        <li id=""><a target="_self" href="archives.html">归档目录</a></li>
        
        <li id="ios.css"><a target="_self" href="ios.html">iOS</a></li>
        
        <li id="swift.css"><a target="_self" href="swift.html">Swift</a></li>
        
        <li id="reactnative.css"><a target="_self" href="reactnative.html">RN</a></li>
        
        <li id="js.css"><a target="_self" href="js.html">JS</a></li>
        
        <li id="shell.css"><a target="_self" href="shell.html">shell</a></li>
        
        <li id="coding.css"><a target="_self" href="coding.html">编程</a></li>
        
        <li id="live.css"><a target="_self" href="live.html">随笔</a></li>
        
        <li id="app.css"><a target="_blank" href="app.html">APP推荐</a></li>
        
        </ul>

        <ul class="right" id="search-wrap">
          <li>
<form target="_blank" onsubmit="return before_search();" action="http://google.com/search" method="get">
    <input type="hidden" id="search_q" name="q" value="" />
    <input tabindex="1" type="search" id="search_input"  placeholder="Search"/>
</form>
</li>
          </ul>
      </div></div>
  </div>
  </section>

</nav>

        <nav class="tab-bar show-for-small">
  <a href="javascript:void(0)" class="left-off-canvas-toggle menu-icon">
    <span> &nbsp; kaelinda</span>
  </a>
</nav>

<aside class="left-off-canvas-menu">
      <ul class="off-canvas-list">
        
        <li><a target="_self" href="index.html">最近更新</a></li>
        
        <li><a target="_self" href="archives.html">归档目录</a></li>
        
        <li><a target="_self" href="ios.html">iOS</a></li>
        
        <li><a target="_self" href="swift.html">Swift</a></li>
        
        <li><a target="_self" href="reactnative.html">RN</a></li>
        
        <li><a target="_self" href="js.html">JS</a></li>
        
        <li><a target="_self" href="shell.html">shell</a></li>
        
        <li><a target="_self" href="coding.html">编程</a></li>
        
        <li><a target="_self" href="live.html">随笔</a></li>
        
        <li><a target="_blank" href="app.html">APP推荐</a></li>
        

    <li><label>Categories</label></li>

        
            <li><a href="reactnative.html">React-Native</a></li>
        
            <li><a href="ios.html">iOS</a></li>
        
            <li><a href="app.html">MacAPP</a></li>
        
            <li><a href="swift.html">Swift</a></li>
        
            <li><a href="js.html">JavaScript</a></li>
        
            <li><a href="vue.html">Vue</a></li>
        
            <li><a href="shell.html">shell</a></li>
        
            <li><a href="%E7%BD%91%E7%BB%9C.html">网络</a></li>
         

      </ul>
    </aside>

<a class="exit-off-canvas" href="#"></a>


        <section id="main-content" role="main" class="scroll-container">
        
       

 <script type="text/javascript">
  $(function(){
    $('#menu_item_index').addClass('is_active');
  });
</script>
<div class="row">
  <div class="large-8 medium-8 columns">
      <div class="markdown-body article-wrap">
       <div class="article">
          
          <h1>DLNA DMR</h1>
     
        <div class="read-more clearfix">
          <span class="date">2018/2/1</span>

          <span>posted in&nbsp;</span> 
          
              <span class="posted-in"><a href='ios.html'>iOS</a></span>
           
         
          <span class="comments">
            

            
          </span>

        </div>
      </div><!-- article -->

      <div class="article-content">
      <h2 id="toc_0">CGUpnpAvRenderer</h2>

<pre><code class="language-text">#if !defined(_CG_CLINKCAV_MEDIARENDERER_H_)
typedef void CgUpnpAvRenderer;
#endif

/**
 * The CGUpnpAvRenderer class is a UPnP/AV media server class.
 */
@interface CGUpnpAvRenderer : CGUpnpDevice
{
    CgUpnpAvRenderer *cAvObject;
}
@property(readonly) CgUpnpAvRenderer *cAvObject;
- (id)init;
- (id)initWithCObject:(CgUpnpDevice *)cobj;
- (BOOL)setAVTransportURI:(NSString *)aURI;
- (BOOL)play;
- (BOOL)stop;
- (BOOL)pause;
- (BOOL)next;
- (BOOL)previous;
- (BOOL)seek:(float)absTime;
- (BOOL)isPlaying;
/*
- (BOOL)start
- (BOOL)stop
*/
- (CGUpnpAVPositionInfo *)positionInfo;
</code></pre>

<h2 id="toc_1">CGUpnpDevice</h2>

<pre><code class="language-text">/**
 * The CGUpnpDevice class is a wrapper class for CgUpnpDevice of CyberLink for C.
 */
// 设备包装类
@protocol CGUpnpDeviceDelegate &lt;NSObject&gt;
@optional
// 收到Action的协议方法
- (BOOL)device:(CGUpnpDevice *)device service:(CGUpnpService *)service actionReceived:(CGUpnpAction *)action;
@end

/**
 * The CGUpnpDevice class is a wrapper class for CgUpnpDevice of CyberLink for C.
 */
@interface CGUpnpDevice : NSObject 
{
    BOOL isCObjectCreated;
}
@property(assign) CgUpnpDevice *cObject;
@property(assign) id&lt;CGUpnpDeviceDelegate&gt; delegate;
/**
 * Create a new UPnP device.
 * 
 * @return New instance if successfull; otherwise nil.
 */
 // 初始化方法 创建一个新的UPnP设备
- (id) init;
/**
 * Create a new UPnP device with the C instance.
 * 
 * @return New instance if successfull; otherwise nil.
 */
 // 用一个设备初始化另一设备
- (id) initWithCObject:(CgUpnpDevice *)cobj;
/**
 * Create a new UPnP device with the XML descriptioin.
 * 
 * @return New instance if successfull; otherwise nil.
 */
 // xml  创建设备
- (id) initWithXMLDescription:(NSString *)xmlDesc;
/**
 * Parse the specified XML description.
 * 
 * @return YES if successfull; otherwise nui.
 */
- (BOOL) parseXMLDescription:(NSString *)xmlDesc;
/**
 * Get the friendly name of the device.
 * 
 * @return Friendly name.
 */
// 获取友好的名字
- (NSString *)friendlyName;
/**
 * Get the device type of the device.
 * 
 * @return Device Type.
 */
 // 设备类型
- (NSString *)deviceType;
/**
 * Get the UDN of the device.
 * 
 * @return UDN of the specified device.
 */
 // 获取设备的UDN
- (NSString *)udn;
/**
 * Return a manufacture.
 *
 * @return Manufacture of the device.
 */
 // 制造商
- (NSString *)manufacturer;

/**
 * Return a model number.
 *
 * @return Model number of the device.
 */
 // 返回模型数
- (NSString *)modelNumber;

/**
 * Return a model name.
 *
 * @return Model name of the device.
 */
 // 返回模型名
- (NSString *)modelName;

/**
 * Return a urlBase
 *
 * @return URLBase of the device.
 */
 // 返回设备的URLBase
- (NSString *)urlBase;
/**
 * Return a descrition URL
 *
 * @return Descripton URL of the device.
 */
 // 返回设备URL描述
- (NSString *)descriptionURL;
/**
 * Return a location URL
 *
 * @return Location URL of the device.
 */
 // 返回一个本地URL
- (NSString *)locationURL;
/**
 * Set a device type of the device.
 * 
 * @param aType Device type to set.
 */
 // 设置设备类型
-(void)setDeviceType:(NSString *)aType;
/**
 * Set a friendly name of the device.
 * 
 * @param aName Friendly name to set.
 */
 // 设置友好名称
-(void)setFriendlyName:(NSString *)aName;
/**
 * Set a udn of the device.
 * 
 * @param aUdn UDN to set.
 */
-(void)setUdn:(NSString *)aUdn;
/**
 * Check whether the device type is the specified type.
 *
 * @param aType A type string of the device.
 * 
 * @return YES if the specified type is same as the device type; otherwise NO.
 */
- (BOOL)isDeviceType:(NSString *)aType;
/**
 * Check whether the device&#39;s UDN is the specified UDN.
 *
 * @param aUDN A UDN string of the device.
 * 
 * @return YES if the specified UDN is same as the device&#39; UDN; otherwise NO.
 */
- (BOOL)isUDN:(NSString *)aUDN;
/**
 * Check whether the device&#39;s friendly name is the specified name.
 *
 * @param aFriendlyName A friendly name string of the device.
 * 
 * @return YES if the specified friendly name is same as the device&#39; friendly name; otherwise NO.
 */
- (BOOL)isFriendlyName:(NSString *)aFriendlyName;
/**
 * Return a presentationURL
 *
 * @return presentationURL of the device.
 */
- (NSString *)presentationURL;
/**
 * Get all services in the device as a NSArray object. The array has the services as instances of CGUpnpService.
 *
 * @return NSArray of CGUpnpService.
 */
 // 返回设备CGUpnpService服务组
- (NSArray *)services;
/**
 * Get a service in the device by the specified service ID.
 *
 * @param serviceId A service ID string of the service.
 *
 * @return The CGUpnpService if the specified service is found; otherwise nil.
 */
 // 根据seviceID 获取服务对象
- (CGUpnpService *)getServiceForID:(NSString *)serviceId;
/**
 * Get a service in the device by the specified service type.
 *
 * @param serviceType A service type string of the service.
 *
 * @return The CGUpnpService if the specified service is found; otherwise nil.
 */
 // 根据类型获取服务对象 service
- (CGUpnpService *)getServiceForType:(NSString *)serviceType;
/**
 * Get all icons in the device as a NSArray object. The array has the services as instances of CGUpnpIconIcon.
 *
 * @return NSArray of CGUpnpIcon.
 */
 // 获取所有图标
- (NSArray *)icons;
/**
 * Start the device.
 *
 * @return YES if the device is started normally, otherwise NO.
 */
- (BOOL)start;
/**
 * Stop the device.
 *
 * @return YES if the device is started normally, otherwise NO.
 */
- (BOOL)stop;
/**
 * Check if the controll point is running.
 *
 * @return YES if the device is started normally, otherwise NO.
 */
 //检查控制点 DMC是否在运行
- (BOOL)isRunning;
/**
 * Announce the device.
 *
 * @return YES if the device is started normally, otherwise NO.
 */
 // 广播这个设备
- (BOOL)announce;
/**
 * Set a user data.
 *
 * @param aUserData A user data to set.
 *
 * @return The CGUpnpService if the specified service is found; otherwise nil.
 */
 // 设置用户数据
- (void)setUserData:(void *)aUserData;
/**
 * Get a stored user data.
 *
 * @return A stored user data.
 */
 获取已存储的用户数据
- (void *)userData;
/**
 * Return a IP address.
 *
 * @return IP address of the device.
 */
 // 获取IP地址
- (NSString *)ipaddress;
/**
 * Return a most smallest icon.
 *
 * @return Smallest Icon.
 */
 // 获取一个最小的 icon
- (CGUpnpIcon *)smallestIcon;
/**
 * Return a most smallest icon with a specified mime type.
 *
 * @return Smallest Icon.
 */
 // 获取指定类型的icon
- (CGUpnpIcon *)smallestIconWithMimeType:(NSString *)mimeType;
/**
 * Return a absolute url of the specified icon.
 *
 * @param anIcon Icon.
 *
 * @return Absolute url of the specified icon.
 */
 // 获取icon的绝对路径
- (NSString *)absoluteIconUrl:(CGUpnpIcon *)anIcon;
</code></pre>

<h2 id="toc_2">CGUpnpStateVariable</h2>

<pre><code class="language-text">#if !defined(_CG_UPNP_CSTATEVARIABLE_H_)
typedef void CgUpnpStateVariable;
#endif

/**
 * The CGUpnpStateVariable class is a wrapper class for CgUpnpStateVariable of CyberLink for C.
 */
@interface CGUpnpStateVariable : NSObject 
{
    CgUpnpStateVariable *cObject;
}
@property(readonly) CgUpnpStateVariable *cObject;
- (id)initWithCObject:(CgUpnpStateVariable *)cobj;
/**
 * Get the name of the state variable.
 * 
 * @return The name.
 */
 // 状态名
- (NSString *)name;
/**
 * Get the value of the state variable.
 * 
 * @return The value.
 */
 // 状态值
- (NSString *)value;

/**
 * Get an array of the allowed values for the state variable
 * 
 * @return The array.
 */
 // 允许的所有状态值
- (NSArray *)allowedValues;

/**
 * Checks whether value is allowed for this state variable
 *
 * @param value to be checked
 *
 * @return YES if true
 */
 // 检测状态值是否是被允许的
- (BOOL)isAllowedValue:(NSString*)value;

/**
 * Send query
 *
 * @return YES if successfull; otherwise NO
 */
- (BOOL)query;
/**
 * Get a states code of the last query. 
 *
 * @return The status code
 */
- (NSInteger)statusCode;
</code></pre>

<h2 id="toc_3">CGUpnpIcon</h2>

<pre><code class="language-text">/**
 * The CGUpnpIcon class is a wrapper class for CgUpnpIcon of CyberLink for C.
 */
@interface CGUpnpIcon : NSObject
{
    CgUpnpIcon *cObject;
#if defined(TARGET_OS_IPHONE)
    NSString *resourceName;
#endif
}
@property(readonly) CgUpnpIcon *cObject;
#if defined(TARGET_OS_IPHONE)
@property(readonly) NSString *resourceName;
#endif
- (id)initWithCObject:(CgUpnpIcon *)cobj;
/**
 * Get the url of the icon.
 * 
 * @return The url.
 */
- (NSString *)url;
/**
 * Get the url of the width.
 * 
 * @return The width.
 */
- (NSInteger)width;
/**
 * Get the height of the icon.
 * 
 * @return The height.
 */
- (NSInteger)height;
/**
 * Get the depth of the icon.
 * 
 * @return The depth.
 */
- (NSInteger)depth;
#if defined(TARGET_OS_IPHONE)
- (void)setResourceName:(NSString *) aResourceName;
#endif
</code></pre>

<h2 id="toc_4">CGUpnpAVPositionInfo</h2>

<pre><code class="language-text">@property(retain) CGUpnpAction *upnpAction;
-(id)initWithAction:(CGUpnpAction *)aUpnpAction;
-(float)trackDuration;
-(float)absTime;
-(float)relTime;
@end

@interface NSString(CGUPnPAV)
// 总时长字符串
+(NSString *)stringWithDurationTime:(float)timeValue;
// 总时长
- (float)durationTime;
</code></pre>

<h2 id="toc_5">CGUpnpAction</h2>

<pre><code class="language-text">@interface CGUpnpAction : NSObject 
{
    CgUpnpAction *cObject;
}
@property(readonly) CgUpnpAction *cObject;
- (id)initWithCObject:(CgUpnpAction *)cobj;
/**
 * Get the name of the action.
 * 行为名称
 * @return The name.
 */
- (NSString *)name;
/**
 * Get all arguments in the action as a NSDictionary object.
 * 获取所有行为对象中的参数
 * @return NSDictionary of the arguments.
 */
- (NSDictionary *)arguments;
/**
 * Set a value of the specified argument from the action by the argument&#39;s name directly.
 * 通过name给指定action设置参数
 * @param value The value to set
 * @param name The name of the argument to look for
 * @return YES if successfull; otherwise NO
 */
- (BOOL)setArgumentValue:(NSString *)value forName:(NSString *)name;
/**
 * Get a value of the specified argument from the action by the argument&#39;s name directly.
 * 通过action参数名 获取action参数值
 * @param name The name of the argument to look for
 * @return The target value if successfull; otherwise NULL
 */
- (NSString *)argumentValueForName:(NSString *)name;
/**
 * Send action
 * 发送Action
 * @return YES if successfull; otherwise NO
 */
- (BOOL)post;
/**
 * Send action
 * 发送action 携带指定参数
 * @param arguments Arguments to set
 *
 * @return YES if successfull; otherwise NO
 */
- (BOOL)postWithArguments:(NSDictionary *)arguments;
/**
 * Get a states code of the last post. 
 * 获取最后POST的状态码
 * @return The status code
 */
- (NSInteger)statusCode;
</code></pre>


    

      </div>

      <div class="row">
        <div class="large-6 columns">
        <p class="text-left" style="padding:15px 0px;">
      
          <a href="15193931556096.html" 
          title="Previous Post: iOS APP性能优化方向分析">&laquo; iOS APP性能优化方向分析</a>
      
        </p>
        </div>
        <div class="large-6 columns">
      <p class="text-right" style="padding:15px 0px;">
      
          <a  href="15173790393385.html" 
          title="Next Post: DLNA DMC">DLNA DMC &raquo;</a>
      
      </p>
        </div>
      </div>
      <div class="comments-wrap">
        <div class="share-comments">
          

          

          
        </div>
      </div>
    </div><!-- article-wrap -->
  </div><!-- large 8 -->




 <div class="large-4 medium-4 columns">
  <div class="hide-for-small">
    <div id="sidebar" class="sidebar">
          <div id="site-info" class="site-info">
            
                <div class="site-a-logo"><img src="https://ws1.sinaimg.cn/large/006tNc79ly1fmpk9088gsj30sg0sgn33.jpg" /></div>
            
                <h1>kaelinda</h1>
                <div class="site-des">倘若我心中的山水，你眼中能看到，我便一步一莲花祈祷</div>
                <div class="social">








<a target="_blank" class="twitter" target="_blank" href="https://twitter.com/KaelLVLinda" title="Twitter">Twitter</a>
<a target="_blank" class="github" target="_blank" href="https://github.com/Kaelzzs" title="GitHub">GitHub</a>
<a target="_blank" class="email" href="mailto:zhouzuosong_kael@163.com" title="Email">Email</a>
  <a target="_blank" class="rss" href="atom.xml" title="RSS">RSS</a>
                
              	 </div>
          	</div>

             

              <div id="site-categories" class="side-item ">
                <div class="side-header">
                  <h2>Categories</h2>
                </div>
                <div class="side-content">

      	<p class="cat-list">
        
            <a href="reactnative.html"><strong>React-Native</strong></a>
        
            <a href="ios.html"><strong>iOS</strong></a>
        
            <a href="app.html"><strong>MacAPP</strong></a>
        
            <a href="swift.html"><strong>Swift</strong></a>
        
            <a href="js.html"><strong>JavaScript</strong></a>
        
            <a href="vue.html"><strong>Vue</strong></a>
        
            <a href="shell.html"><strong>shell</strong></a>
        
            <a href="%E7%BD%91%E7%BB%9C.html"><strong>网络</strong></a>
         
        </p>


                </div>
              </div>

              <div id="site-categories" class="side-item">
                <div class="side-header">
                  <h2>Recent Posts</h2>
                </div>
                <div class="side-content">
                <ul class="posts-list">
	      
		      
			      <li class="post">
			        <a href="15523077857608.html">OC中枚举写法  以及 字符串枚举探索</a>
			      </li>
		     
		  
		      
			      <li class="post">
			        <a href="15522686353535.html">iOS 动画全解 (1)</a>
			      </li>
		     
		  
		      
			      <li class="post">
			        <a href="15501356584731.html">UITableView顶部空白的几种解决办法</a>
			      </li>
		     
		  
		      
			      <li class="post">
			        <a href="15488351784332.html">Objective-C中的字符串类型枚举 探索</a>
			      </li>
		     
		  
		      
			      <li class="post">
			        <a href="15409691048860.html">【Swift笔记】引用计数</a>
			      </li>
		     
		  
		      
		  
		      
		  
		      
		  
		      
		  
		      
		  
		      
		  
		      
		  
		      
		  
		      
		  
		      
		  
		      
		  
		      
		  
		      
		  
		      
		  
		      
		   
		  		</ul>
                </div>
              </div>
        </div><!-- sidebar -->
      </div><!-- hide for small -->
</div><!-- large 4 -->

</div><!-- row -->

 <div class="page-bottom clearfix">
  <div class="row">
   <p class="copyright">Copyright &copy; 2015
Powered by <a target="_blank" href="http://www.mweb.im">MWeb</a>,&nbsp; 
Theme used <a target="_blank" href="http://github.com">GitHub CSS</a>.</p>
  </div>
</div>

        </section>
      </div>
    </div>

  
    

    <script src="asset/js/foundation.min.js"></script>
    <script>
      $(document).foundation();
      function fixSidebarHeight(){
        var w1 = $('.markdown-body').height();
          var w2 = $('#sidebar').height();
          if (w1 > w2) { $('#sidebar').height(w1); };
      }
      $(function(){
        fixSidebarHeight();
      })
      $(window).load(function(){
          fixSidebarHeight();
      });
     
    </script>

    
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script><script type="text/x-mathjax-config">MathJax.Hub.Config({TeX: { equationNumbers: { autoNumber: "AMS" } }});</script>


  </body>
</html>
